package com.xx.pinball;

import android.os.Bundle;

import com.madhouse.android.ads.AdListener;
import com.madhouse.android.ads.AdView;
import com.xx.pinball.framwork.Game;
import com.xx.pinball.framwork.Music;
import com.xx.pinball.framwork.Screen;

public class Pinball extends Game {
    Music music;
    
    
    @Override
	public void onCreate(Bundle instanceBundle) {
		super.onCreate(instanceBundle);
//		AdView adview = (AdView) findViewById(R.id.ad1);
//		adview.setListener(new AdListener() {
//			
//			@Override
//			public void onAdFullScreenStatus(boolean arg0) {
//				System.out.println("full screen");
//			}
//			
//			@Override
//			public void onAdEvent(AdView arg0, int arg1) {
//				System.out.println("on ad event");
//			}
//		});
	}

	public Screen createStartScreen() {
        music = this.loadMusic("music.ogg");
        music.setLooping(true);
        return new MainMenuScreen(this);
    }       
    
    public void onPause() {
        super.onPause();
        music.pause();
    }
    
    public void onResume() {
        super.onResume();
        music.play();
    }
}